<%
# Copyright (C) 2012 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<div id="enroll_form">
  <p><%= mt :already_enrolled, "You are already enrolled in **%{course}**.", :course => @course.name %></p>

  <div class="ic-Self-enrollment-footer-modal-layout">
    <div class="ic-Self-enrollment-footer">
      <div class="ic-Self-enrollment-footer__Primary">
        <% if @course.user_is_student?(@current_user)
        # i.e. *current* student, the course has started %>
          <a class="btn" href="<%= dashboard_url %>" target="_top"><%= t "buttons.go_to_dashboard", "Go to your Dashboard" %></a>
          <a class="btn btn-primary" href="<%= course_url(@course) %>" target="_top"><%= t "buttons.go_to_course", "Go to the Course" %></a>
        <% else %>
          <a class="btn btn-primary" href="<%= dashboard_url %>" target="_top"><%= t "buttons.go_to_dashboard", "Go to your Dashboard" %></a>
        <% end %>
      </div>
    </div>
  </div>

</div>
